<!doctype html>
<#assign ctx=request.contextPath>
<html>
<head>
<title>购物车</title>
<meta charset="utf-8">
<#include "header.html"/>
<#import "/macros/header_macro.html" as muyaxuan_header>
<link rel="stylesheet" type="text/css" href="${ctx}/css/header1.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/shopping_cart.css">
<script type="text/javascript">
      
        function deleteFn(id){
            
			    		var d = dialog({
							title:id,
						    content: '<img src=${ctx}/images/logo3.jpg style="width:200px;height:124px;"><br><font size=3 color=red>您确定要删除对应的数据吗?</font>',
						    okValue:'确定',
						    ok:function(){
						    	this.title("请稍等...");
						    	window.location="${ctx}/customer/deleteCarGoods?id="+id;
						    	return false;
						    },
						    cancelValue:'取消',
						    cancel:function(){}
						});
						d.showModal();
    	        };
        $(function(){
           $(".checked").click(function(){
               $(".checkbox").attr("checked",true);
           });
           $("#commit").click(function(){
               var boxs = $("input[id^='box_']:checked");
               if(boxs.length==0){
                     alert("请选择要结算的商品");
               }else{
                     var ids = boxs.map(function(){
                           return this.value;
                     });
                     window.location="${ctx}/customer/showOrder?ids="+ids.get();
               }

           });
        });
    	        
    	        
    	        
    	        
</script>
</head>
<body>
<!--头部导航栏-->
  <@muyaxuan_header.header ctx="${ctx}"/>
<!--中间内容部分content-->
<div class="content">
  <div class="cont_nav">
    <img src="${ctx}/images/nav1.png">
    <ul>
      <li>购物车</li>
      <li>确认订单信息</li>
      <li>我的订单</li>
      <li>支付页</li>
    </ul>
  </div>
  
  <div class="cont_nav_1">
      <ul>
       <li><input class="checked"  type="checkbox"/>全选</li>
       <li>商品信息</li>
       <li>单价（元）</li>
       <li>数量</li>
       <li>总金额（元）</li>
      </ul>
  </div>
 
 <ul class="cont_list">
   <#if goodsList??>
   <#list goodsList as goods>
   <li>
    <input class="checkbox" value="${goods.id}" id="box_${goods.id}" type="checkbox"/>
    <a href="product_details.html"><img src="${ctx}/${goods.image}" style="width:100px;height:100px"></a>
    <div class="list_r">
            <p><a href="product_details.html">${goods.title}</a></p>
            <ul class="li_p3">
              <li>${goods.favorablePrice}</li>
              <li><div class="jian" id="jian">-</div>
                  <input class="input" type="text" name="number" value="${goods.buyNum}" maxlength="3" />
                  <div class="jia" id="jia">+</div>
              </li>
              <li>${goods.buyMoney}</li>
            </ul> 
            <ul class="li_p5">
              <!-- <li><a href="#">移入收藏夹</a></li> -->
              <li><a href="javascrip:;" onclick="deleteFn(${goods.id})">删除</a></li>
            </ul>
    </div>
    <div class="cle"></div>
   </li>
   </#list>
   </#if>
   <div class="cle"></div>
 </ul>
 
   <h3>总金额：<span>￥${totalMoney}</span></h3>
   <h3>应付金额(包邮)：<span>￥${totalMoney}</span></h3>
   <div class="btn">
       <form action="" method="post" id="shopCarForm">
         <a href="${ctx}/customer/showOrderDetails">2</a>
        <input type="button" value="结算" name="btn" id="commit"/>
       </form>
   </div>
 
 <h2 class="h2">
    <a href="#">上一页</a> 
    <a class="curt" href="#">1</a> 
    <a href="#">2</a> 
    <a href="#">3</a> 
             .... 
    <a href="#">33</a> 
    <a href="#">下一页</a> 
  </h2>
 
</div>

<!--尾部开始-->
<div class="footer">
 <div class="tfoot">
  <div class="cust">
   <ul>
   <li>
      <img src="${ctx}/images/cust-logo1.png">
     <h1>品质保障</h1>
     <p>品质护航 购物无忧</p>
   </li>
   <li>
     <img src="${ctx}/images/cust-logo2.png">
     <h1>七天无理由退换货</h1>
     <p>为您提供售后无忧保障</p>
   </li>
   <li>
     <img src="${ctx}/images/cust-logo3.png">
     <h1>正品行货</h1>
     <p>轻松购物</p>
   </li>
   <li>
     <img src="${ctx}/images/cust-logo4.png">
     <h1>天天低价</h1>
     <p>提供性价比高的货物</p>
   </li>
  </ul>
  </div>
  <div class="fcata">
    <ul>
      <li>
       <dl>
        <dt><a href="#">新手上路</a></dt>
        <dd><a href="#">订购方式</a></dd>
        <dd><a href="#">购物流程</a></dd>
        <dd><a href="#">售后流程</a></dd>
       </dl>
      </li>
      <li>
       <dl>
        <dt><a href="#">配送与支付</a></dt>
        <dd><a href="#">货到付款区域</a></dd>
        <dd><a href="#">支付方式说明</a></dd>
        <dd><a href="#">新手上路教程</a></dd>
       </dl>
      </li>
      <li>
       <dl>
        <dt><a href="#">会员中心</a></dt>
        <dd><a href="#">资金管理</a></dd>
        <dd><a href="#">我的收藏</a></dd>
        <dd><a href="#">我的订单</a></dd>
       </dl>
      </li>
      <li>
       <dl>
        <dt><a href="#">服务保证</a></dt>
        <dd><a href="#">退换货原则</a></dd>
        <dd><a href="#">售后服务保证</a></dd>
        <dd><a href="#">品质保证</a></dd>
       </dl>
      </li>
      <li>
       <dl>  
        <dt><a href="#">关于我们</a></dt>
        <dd><a href="#">公司简介</a></dd>
        <dd><a href="#">发展历程</a></dd>
       </dl>
      </li>
     </ul>
  </div>
 </div>
 <div class="bfoot">
   <p>
    <a href="#">免责条款</a>
    <a href="#">隐身保护</a>
    <a href="#">招聘英才</a>
    <a href="#">联系我们</a>
    <a href="#">公司简介</a>
    <a href="#">批发方案</a>
    <a href="#">配送方式</a>
    <a href="#">留言板</a>
   </p>
   
   <h1>Copyright ? 2003-2016 muyaxuan.net, All Rights Reserved</h1>
  </div>
</div>
<!--尾部结尾-->
</body>
</html>
<script src="${ctx}/js/header.js"></script>
<script src="${ctx}/js/my_order.js"></script>
